import React from 'react'
import {BrowserRouter as Router, Route, Redirect} from 'react-router-dom'
import CityList from './pages/citylist'
import Home from './pages/home'
import Map from './pages/map'

export default class App extends React.Component {
  render() {
    return (
      <Router>
        <div className="app-box">
          <Route exact path="/" render={() => <Redirect to="/home" />}/>
          <Route path="/home" component={Home}/>
          <Route path="/map" component={Map}/>
          <Route path="/citylist" component={CityList}/>
        </div>
      </Router>
    )
  }
}
